﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="wfPopularCity.aspx.cs" Inherits="msBsc.WebUi.wMall.Public.wfPopularCity" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>热门城市</title>
    <link href="/themes/wStyle1/css/sLayout.css" rel="stylesheet" />
    <link href="/themes/wStyle1/css/Public/sTravel.css" rel="stylesheet" />
    <style type="text/css">
        .head {
            width: 100%;
            height: 55px;
            border-bottom: 1px solid #bcbcbc;
            background: #fff;
            position: fixed;
            top: 0px;
        }

            .head .h_content {
                width: 1200px;
                margin: auto;
                height: 55px;
            }

                .head .h_content .hc_login {
                    width: 236px;
                    float: left;
                    height: 55px;
                }

                .head .h_content .hc_menu {
                    float: left;
                    width: 728px;
                    height: 55px;
                }

                    .head .h_content .hc_menu li {
                        line-height: 55px;
                        padding: 0px 13px;
                        float: left;
                        font-size: 14px;
                        font-family: 微软雅黑;
                        color: #333333;
                        cursor: pointer;
                    }

                        .head .h_content .hc_menu li:hover {
                            background: #95cc11;
                            color: #fff;
                        }

                        .head .h_content .hc_menu li.hcm_check {
                            background: #95cc11;
                            color: #fff;
                            cursor: auto;
                        }

                .head .h_content .hc_rmenu {
                    width: 236px;
                    height: 55px;
                    float: left;
                    text-align: right;
                }

                    .head .h_content .hc_rmenu li {
                        display: inline;
                        text-align: right;
                        line-height: 55px;
                        font-size: 14px;
                        color: #333;
                        font-family: 微软雅黑;
                    }

                        .head .h_content .hc_rmenu li .hcr_reg {
                            color: #95cc11;
                        }

                        .head .h_content .hc_rmenu li.hc_hr {
                            margin: 0px 12px;
                        }

        .viewContent {
            width: 1200px;
            margin: 56px auto 0px auto;
            text-align: left;
        }

            .viewContent .v_title {
                width: 1200px;
                height: 118px;
                line-height: 118px;
                border-bottom: 2px solid #ccc;
            }

                .viewContent .v_title .condition_title {
                    float: left;
                    width: 245px;
                }

                .viewContent .v_title .vt_img {
                    vertical-align: middle;
                }

                .viewContent .v_title .vt_name {
                    font-size: 36px;
                    color: #666666;
                    font-family: 微软雅黑;
                    vertical-align: middle;
                    margin-left: 25px;
                    margin-right: 25px;
                }

        .condition_city {
            float: left;
            margin: 43px 5px;
        }

    </style>
</head>
<body>
    <div class="head">
        <input type="hidden" id="cityId" />
        <div class="h_content">
            <div class="hc_login">
                <img src="/themes/wStyle1/Images/comm/log.png" />
            </div>
            <ul class="hc_menu">
                <li class="hcm_check">首页</li>
                <li>热门城市</li>
                <li>美食资讯</li>
                <li>包车资讯</li>
                <li>购物资讯</li>
                <li>司机资讯</li>
                <li>提交需求</li>
            </ul>
            <ul class="hc_rmenu">
                <li><a class="hcr_reg">登录</a></li>
                <li class="hc_hr">|</li>
                <li><a class="hcr_reg">注册</a></li>
            </ul>
        </div>
    </div>
    <div class="viewContent">
        <div class="v_title">
            <div class="condition_title">
                <img src="/themes/wStyle1/Images/Public/citys.png" class="vt_img" style="" />
                <span class="vt_name">热门城市</span>
            </div>
            <div class="condition_city" id="countryId_select"></div>
            <div class="condition_city" id="cityId_select"></div>
        </div>
        <ul class="travel_lit" id="travel_list">
            <li>
                <a class="travelC" href="/wp_TravelFoodInfo.htm?foodId={{d.rows[i].NICEFOOD_ID}}" target="_blank">
                    <img src="http://www.dijieke.com/UpLoad/scenic/1433316964_162.jpg?1433317194033" title="{{d.rows[i].NICEFOOD_NAME}}" />

                </a>
                <div class="classicInfo">
                    <div class="tl_name"><a>丽江</a></div>
                    <div class="tl_shopping tl_checkShopp"><a class="shoppName"><em class="shoppCar"></em>加入购物车</a></div>
                </div>
            </li>
            <li>
                <a class="travelC" href="/wp_TravelFoodInfo.htm?foodId={{d.rows[i].NICEFOOD_ID}}" target="_blank">
                    <img src="http://www.dijieke.com/UpLoad/scenic/1433316964_162.jpg?1433317194033" title="{{d.rows[i].NICEFOOD_NAME}}" />

                </a>
                <div class="classicInfo">
                    <div class="tl_name"><a>丽江</a></div>
                    <div class="tl_shopping"><a class="shoppName"><em class="shoppCar"></em>加入购物车</a></div>
                </div>
            </li>
            <li>
                <a class="travelC" href="/wp_TravelFoodInfo.htm?foodId={{d.rows[i].NICEFOOD_ID}}" target="_blank">
                    <img src="http://www.dijieke.com/UpLoad/scenic/1433316964_162.jpg?1433317194033" title="{{d.rows[i].NICEFOOD_NAME}}" />

                </a>
                <div class="classicInfo">
                    <div class="tl_name"><a>丽江</a></div>
                    <div class="tl_shopping"><a class="shoppName"><em class="shoppCar"></em>加入购物车</a></div>
                </div>
    </li>
            <li>
                <a class="travelC" href="/wp_TravelFoodInfo.htm?foodId={{d.rows[i].NICEFOOD_ID}}" target="_blank">
                    <img src="http://www.dijieke.com/UpLoad/scenic/1433316964_162.jpg?1433317194033" title="{{d.rows[i].NICEFOOD_NAME}}" />

                </a>
                <div class="classicInfo">
                    <div class="tl_name"><a>丽江</a></div>
                    <div class="tl_shopping"><a class="shoppName"><em class="shoppCar"></em>加入购物车</a></div>
                </div>

            </li>

    </ul>
          <xmp id="city_list_temp" style="display: none">
                        {{#for(var i=0,len=d.rows.length;i < len;i++){ }}
                        <li>
                <a class="travelC" href="/wp_VehicleInfo.htm?vehicleId={{d.rows[i].COUNTRY_CITY_ID}}" target="_blank">
                    <img src="{d.rows[i].CITY_CARD}}" title="{{d.rows[i].COUNTRY_CITY_NME}}" />

                </a>
                <div class="classicInfo">
                    <div class="tl_name"><a>{{d.rows[i].COUNTRY_CITY_NME}}</a></div>
                    <div class="tl_shopping tl_checkShopp"><a class="shoppName"><em class="shoppCar"></em>加入购物车</a></div>
                </div>
            </li>
                        {{#} }}
             </xmp>
    </div>
</body>
<!--start JS引用-->
<script src="/jqPlugin/js/jquery-1.8.3.min.js"></script>
<script src="/jqPlugin/js/jBase.js"></script>
<script src="/jqPlugin/js/jBPage.js"></script>
<script src="/jqPlugin/js/laytpl.js"></script>
<script src="/jqPlugin/SelectSimu/js/SelectSimu.js"></script>
<script src="/themes/wStyle1/js/comm/jsLayout.js"></script>
<script src="/themes/wStyle1/js/comm/jsPagination.js"></script>
<script src="/themes/wStyle1/js/comm/VerifyJs.js"></script>
<!--end JS引用-->
<script type="text/javascript">
    setArea("countryId_select", 82, 1, 1, ["DF6723BE-A25C-4F77-BB49-A1662D3E6F2A"], ["中国"]);
    setArea("cityId_select", 82, 2, 1, ["AEF39D8E-D298-4AF1-AEC5-2B00D237F5F5"], ["北京"]);
    setArea("destionId_select", 82, 3, 1, [""], ["全部"]);
    setArea("travel_type", 82, 4, 3, ["景点", "美食", "购物"], ["景点", "美食", "购物"]);
    var cityId = "";
    (function () {
        $("#countryId").val(GetQueryStr("countryId"));
        cityId = GetQueryStr("cityId");
        $("#cityId").val(cityId);
        $("#destionId").val(GetQueryStr("destionId"));
        $("#pageIndex").val(GetQueryStr("pIndex"));
        btnDo("init");
        checkCity();
        $(".tl_shopping").mousemove(function () {
            if (!$(this).hasClass("tl_checkShopp")) {
                $(this).addClass("tl_checkShopp");
                $(this).addClass("tl_zero");
            }
        });
        $(".tl_shopping").mouseout(function () {
            if ($(this).hasClass("tl_zero")) {
                $(this).removeClass("tl_checkShopp");
                $(this).removeClass("tl_zero");
            }
        });
    })()

    function checkCity() {
        $("#cityId_select .selectList li").live('click', function () {
            var city = this.getAttribute('data-value');
            if (city==cityId) {
                return;
            }
            cityId = city;
            var opart = new jsonRow();
            opart.AddCell("parentsId", "DF6723BE-A25C-4F77-BB49-A1662D3E6F2A");
            opart.AddCell("isAll", "true");
            opart.AddCell("cityId", city);
            opart.AddCell("ACTION", "upCity");
            ajaxComm(opart);
        });
       
    }

    function btnDo(sEbtn) {
        GtGrid1Action = sEbtn;
        var opart = new jsonRow();
        if (sEbtn == "init") {
            opart = GetGtParam();
        }
        ajaxComm(opart);
    };
    //执行AJAX调用时获取参数
    function GetGtParam() {
        var pIndex = $("#pageIndex").val();
        if (IsNull(pIndex) || isNaN(pIndex)) {
            pIndex = 1;
        }
        var _jsParam = new jsonRow();
        _jsParam.AddCell("parentsId", "DF6723BE-A25C-4F77-BB49-A1662D3E6F2A");
        _jsParam.AddCell("isAll", "true");
        _jsParam.AddCell("cityId", $("#cityId").val());
        _jsParam.AddCell("ACTION", GtGrid1Action);
        return _jsParam;
    };

    function setArea(input, width, zIndex, listNum, listValue, listOption) {
        $("#" + input).SelectSimu({
            width: width,
            zIndex: zIndex,
            listNum: listNum,
            listValue: listValue,
            listOption: listOption,
            imgSrc: '/jqPlugin/SelectSimu/img/icon_down.png'
        })
    }

    function updateSelet(inputId, data, selectId) {
        var selectValue = $("#" + inputId + " .selectList ul");
        selectValue.html("");
        var isSelect = false;
        for (var i = 0; i < data.rows.length; i++) {
            if (selectId == data.rows[i].COUNTRY_CITY_ID) {
                $("#" + inputId + " input").val(data.rows[i].COUNTRY_CITY_ID);
                $("#" + inputId + " span").text(data.rows[i].COUNTRY_CITY_NME);
                isSelect = true;
            }
            selectValue.append('<li data-value="' + data.rows[i].COUNTRY_CITY_ID + '">' + data.rows[i].COUNTRY_CITY_NME + '</li>');
        }
        if (isSelect == false && data.rows.length > 0) {
            $("#" + inputId + " input").val(data.rows[0].COUNTRY_CITY_ID);
            $("#" + inputId + " span").text(data.rows[0].COUNTRY_CITY_NME);
        }
    }

    function laySvcList(svcListData, rows) {
        var _html = $('#svc_list_temp').html();
        //$("#scenicList").html("");
        laytpl(_html).render(svcListData, function (render) {
            $("#travel_list").html(render);
        });
        var pIndex = $("#pageIndex").val();
        if (IsNull(pIndex) || isNaN(pIndex)) {
            pIndex = 1;
        }
        jsPage('divPage', rows, 15, pIndex, 'goPage');
    };
    //laySvcList();
    function goPage(pIndex) {
        var countryId = $("#countryId").val();
        var cityId = $("#cityId").val();
        var destionId = $("#destionId").val();
        window.location.href = "/wp_TravelScenicList.htm?countryId=" + countryId + "&cityId=" + cityId + "&destionId=" + destionId + "&pIndex=" + pIndex;
    }
</script>
</html>
